package com.tj.collection.controller.lending.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.StringUtils;
import com.fqgj.exception.common.ApplicationException;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/7/5
 * Time: 上午10:30
 */
public class CollectionMoveRequest extends ParamsObject {

    //语言
    private String userLanguage;
    //催收单号
    private String collectionNo;

    public String getUserLanguage() {
        return userLanguage;
    }

    public CollectionMoveRequest setUserLanguage(String userLanguage) {
        this.userLanguage = userLanguage;
        return this;
    }

    public String getCollectionNo() {
        return collectionNo;
    }

    public CollectionMoveRequest setCollectionNo(String collectionNo) {
        this.collectionNo = collectionNo;
        return this;
    }

    @Override
    public void validate() {
        if (StringUtils.isEmpty(collectionNo)) {
            throw new ApplicationException("collectionNo is empty");
        }
        if (StringUtils.isEmpty(userLanguage)) {
            throw new ApplicationException("Language is empty");
        }
    }

}
